package question_handler

import (
	"peilian-api/app/services/question_service"
	"peilian-api/utils/format"

	"github.com/gin-gonic/gin"
)

func GetQuestion(ctx *gin.Context) {

	questions, err := question_service.GetQuestion(ctx)
	if err.Err != nil {
		format.NewResponseJson(ctx).Err(err.Code, err.Err.Error())
		return
	}

	format.NewResponseJson(ctx).SuccessObj(questions)
}
